<!doctype html>



  


<html class="theme-next mist use-motion">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>



<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />












  <link href="/vendors/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css"/>




  <link href="//fonts.googleapis.com/css?family=Lato:300,400,700,400italic&subset=latin,latin-ext" rel="stylesheet" type="text/css">



<link href="/vendors/font-awesome/css/font-awesome.min.css?v=4.4.0" rel="stylesheet" type="text/css" />

<link href="/css/main.css?v=0.5.0" rel="stylesheet" type="text/css" />


  <meta name="keywords" content="Hexo, NexT" />








  <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico?v=0.5.0" />






<meta name="description" content="Bellman ford 算法一句话算法：Bellman ford 对于没有负权回路的图，对每个点进行 n-1 轮的松弛操作
图的性质
为了解决含有负权边 的图 最短路径问题而提出的算法
不能处理有负权回路的图的最短路径问题

bellman_ford算法思想bellman_ford算法的本质是一种DP算法,我们设: $dis^1[u]$,$dis^2[u]$,…,$dis^{n-1}[u]$其中">
<meta property="og:type" content="article">
<meta property="og:title" content="Bellman_ford 算法">
<meta property="og:url" content="http://yoursite.com/2015/12/bellman_ford/index.html">
<meta property="og:site_name" content="Rainboy">
<meta property="og:description" content="Bellman ford 算法一句话算法：Bellman ford 对于没有负权回路的图，对每个点进行 n-1 轮的松弛操作
图的性质
为了解决含有负权边 的图 最短路径问题而提出的算法
不能处理有负权回路的图的最短路径问题

bellman_ford算法思想bellman_ford算法的本质是一种DP算法,我们设: $dis^1[u]$,$dis^2[u]$,…,$dis^{n-1}[u]$其中">
<meta property="og:updated_time" content="2016-03-12T13:47:53.669Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Bellman_ford 算法">
<meta name="twitter:description" content="Bellman ford 算法一句话算法：Bellman ford 对于没有负权回路的图，对每个点进行 n-1 轮的松弛操作
图的性质
为了解决含有负权边 的图 最短路径问题而提出的算法
不能处理有负权回路的图的最短路径问题

bellman_ford算法思想bellman_ford算法的本质是一种DP算法,我们设: $dis^1[u]$,$dis^2[u]$,…,$dis^{n-1}[u]$其中">



<script type="text/javascript" id="hexo.configuration">
  var NexT = window.NexT || {};
  var CONFIG = {
    scheme: 'Mist',
    sidebar: {"position":"left","display":"hide"},
    fancybox: true,
    motion: true,
    duoshuo: {
      userId: 0,
      author: 'Author'
    }
  };
</script>

  <title> Bellman_ford 算法 | Rainboy </title>
</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh_Hans">

  










  
  
    
  

  <div class="container one-collumn sidebar-position-left page-post-detail ">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-meta ">
  

  <div class="custom-logo-site-title">
    <a href="/"  class="brand" rel="start">
      <span class="logo-line-before"><i></i></span>
      <span class="site-title">Rainboy</span>
      <span class="logo-line-after"><i></i></span>
    </a>
  </div>
  <p class="site-subtitle"></p>
</div>

<div class="site-nav-toggle">
  <button>
    <span class="btn-bar"></span>
    <span class="btn-bar"></span>
    <span class="btn-bar"></span>
  </button>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/" rel="section">
            
              <i class="menu-item-icon fa fa-home fa-fw"></i> <br />
            
            Startseite
          </a>
        </li>
      
        
        <li class="menu-item menu-item-categories">
          <a href="/categories" rel="section">
            
              <i class="menu-item-icon fa fa-th fa-fw"></i> <br />
            
            Kategorien
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/archives" rel="section">
            
              <i class="menu-item-icon fa fa-archive fa-fw"></i> <br />
            
            Archiv
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tags">
          <a href="/tags" rel="section">
            
              <i class="menu-item-icon fa fa-tags fa-fw"></i> <br />
            
            Tags
          </a>
        </li>
      

      
    </ul>
  

  
</nav>

 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  
  

  
  
  

  <article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
            
            
              
                Bellman_ford 算法
              
            
          </h1>
        

        <div class="post-meta">
          <span class="post-time">
            <span class="post-meta-item-icon">
              <i class="fa fa-calendar-o"></i>
            </span>
            <span class="post-meta-item-text">Veröffentlicht am</span>
            <time itemprop="dateCreated" datetime="2015-12-28T00:00:00+08:00" content="2015-12-28">
              2015-12-28
            </time>
          </span>

          

          
            
              <span class="post-comments-count">
                &nbsp; | &nbsp;
                <a href="/2015/12/bellman_ford/#comments" itemprop="discussionUrl">
                  <span class="post-comments-count ds-thread-count" data-thread-key="2015/12/bellman_ford/" itemprop="commentsCount"></span>
                </a>
              </span>
            
          

          

          
          

        </div>
      </header>
    


    <div class="post-body" itemprop="articleBody">

      
      

      
        <h1 id="Bellman-ford-算法"><a href="#Bellman-ford-算法" class="headerlink" title="Bellman ford 算法"></a>Bellman ford 算法</h1><p><strong>一句话算法：Bellman ford 对于没有负权回路的图，对每个点进行 n-1 轮的松弛操作</strong></p>
<h3 id="图的性质"><a href="#图的性质" class="headerlink" title="图的性质"></a>图的性质</h3><ul>
<li>为了解决含有<strong>负权边</strong> 的图 <strong>最短路径</strong>问题而提出的算法</li>
<li>不能处理有<strong>负权回路</strong>的图的最短路径问题</li>
</ul>
<h3 id="bellman-ford算法思想"><a href="#bellman-ford算法思想" class="headerlink" title="bellman_ford算法思想"></a>bellman_ford算法思想</h3><p>bellman_ford算法的本质是一种DP算法,我们设: $dis^1[u]$,$dis^2[u]$,…,$dis^{n-1}[u]$<br>其中:</p>
<ul>
<li>$dist^1[u]$为从源点v到终点u的<strong>只经过一条边</strong>的最短路径长度,并有$dis^1[u]=Edge[v][u]$;</li>
<li>$dist^2[u]$为从源点v到终点u<strong>最多经过两条边</strong>的到达终点U的最短路径长度;</li>
<li>$dist^3[u]$为从源点v到终点u<strong>最多经过不构成负权值回路的三条边</strong>到达终点u的最短路径长度;</li>
<li>………</li>
<li>$dist^{n-1}[u]$为从源点v到终点u<strong>最多经过不构成负权值回路的n-1条边</strong>到达终点u的最短路径长度;</li>
</ul>
<p>算法的最终目的是计算出$dist^{n-1}[u]$,它就是源点v到点u的最短路径长度(任意两个点之间的最短路径经过的边最多不超过n-1个,n为图的顶点数)<br>上面的设计其时也就是DP中的子问题,我们知道DP中最重要的就是:</p>
<ul>
<li>分解子问题</li>
<li>子问题之间的递推关系(子问题的解推出大问题的解,DP方程)</li>
</ul>
<p>那么DP方程就是:</p>
<p>$$dist^k[u] = min{dist^{k-1}[u] ,min{dist^{k-1}[j]+Edge[j][u]} }$$</p>
<p>其中<br>$dist^{k-1}[u]$表示:从源点v经过不构成负权回路的k-1条边到达点u的最短路径<br>$min{dist^{k-1}[j]+Edge[j][u]}$表示:从源点v不经过k－1条边到达点j的最短路径 + 边<j,u>的长度,点是是u的邻点<br>$dist^1[u]=Edge[v][u]$表示边界</j,u></p>
<h3 id="推论优化"><a href="#推论优化" class="headerlink" title="推论优化"></a>推论优化</h3><p>现在我们就可以根据上面的DP方程来写我们的代码了,相一想如果用二维数组来存图,<br>第一层循环是2-&gt;n 次循环,第一个是u:1-&gt;n次循环遍历每个点,第三次是j:1-&gt;n次循环判断某个点是不是u的邻点</p>
<p>伪代码如下:</p>
<pre><code>int Edge[n][n];//用来存图
int n,e;//n个点,e条边
int path[n];//记录路径,path[i]点i在最短路径中的上一个节点
void bellman_ford(int v){//源点v
    int i,k,u;
    for(i=0;i&lt;n;i++){//dis[]初始化
        dis[i] = Edge[v][i];
        if(i != v &amp;&amp; dis[i] &lt; MAX ) path[i] = v;
        else path[i]=-1;
    }

    for(k=2;k&lt;n;k++)//求dis^2[],dis^3[],....,dis^n-1[]
        for(u=0;u&lt;n;u++)//遍历每一个点
        {
            if(u != v) .// 不= 起点
            {
                if(i=0;i&lt;n;i++){//遍历每一个点,判断是不是u的邻点
                    if(Edge[i][u]&lt;MAX &amp;&amp; dis[u] &gt; dis[i]+Edge[i][u])
                    {
                        dis[u] = dis[i] +Edge[i][u];
                        path[u]=i;
                    }

                }
            }
        }

}
</code></pre><p>如果这样写有三层for循环,复杂度$O(n^3)$这样太复杂了,代码长度太长,<strong>仔细想一想:</strong>第一层for 是用来确定循环的次数:<strong>n-1</strong>,这个不能改变。<br>下面两层循环的含意:一个点去新相邻的点,当能更新的时候。如果我们遍历每条边(因为边上的点正好相邻,不用去判断点的相邻关系了)去更新点,可以省很多代码,同样bellman_ford也可以用一个句简单的话来概括:<br><strong>一句话算法：Bellman ford 对于没有负权回路的图，对每个点进行 n-1 轮的松弛操作</strong></p>
<h3 id="伪代码"><a href="#伪代码" class="headerlink" title="伪代码"></a>伪代码</h3><pre><code class="c">---&gt;G(V,E):V个点，E条边
    for(int i=1;i&lt;=V-1;i++)//进行v-1轮操作
        for(j=1;j&lt;=E;j++){ //对每个点进行松弛，如果遍历每个边的话，每个边上的两个点正好相连
            if(d[u] &gt; d[a]+w(u,a)) 
                d[u]=d[a]+w(u,a);
        }
</code></pre>
<h3 id="Dijkstra-与-bellman-ford算法的区别"><a href="#Dijkstra-与-bellman-ford算法的区别" class="headerlink" title="Dijkstra 与 bellman_ford算法的区别"></a>Dijkstra 与 bellman_ford算法的区别</h3><ul>
<li>Dijkstra算法在求解过程中,源点到集合s内各项点的最短路径一旦求出,则之后就不变了,修改的仅仅是源点到T集合的各顶点的最短路径长度</li>
<li>bellman_ford算法在求解过程中,每次循环都要修改所有顶点的dist[],也就是说源点到各个顶点的最短路径一直到bellman_ford算法结束才确定下来</li>
</ul>
<h3 id="想一想"><a href="#想一想" class="headerlink" title="想一想"></a>想一想</h3><p>是不是每个点都要进行n-1轮操作(松弛)</p>

      
    </div>

    <div>
      
        
      
    </div>

    <footer class="post-footer">
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/2015/10/bubble_sort/" rel="next" title="冒泡排序">
                <i class="fa fa-chevron-left"></i> 冒泡排序
              </a>
            
          </div>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/2015/12/spfa算法/" rel="prev" title="spfa算法">
                spfa算法 <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </article>



    <div class="post-spread">
      
    </div>
  </div>


          </div>
          


          
  <div class="comments" id="comments">
    
      <div class="ds-thread" data-thread-key="2015/12/bellman_ford/"
           data-title="Bellman_ford 算法" data-url="http://yoursite.com/2015/12/bellman_ford/">
      </div>
    
  </div>


        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap" >
            Inhaltsverzeichnis
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview">
            Übersicht
          </li>
        </ul>
      

      <section class="site-overview sidebar-panel ">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
          <img class="site-author-image" itemprop="image"
               src="/images/avatar.jpg"
               alt="Rainboy" />
          <p class="site-author-name" itemprop="name">Rainboy</p>
          <p class="site-description motion-element" itemprop="description">Rainboy Personal Blog by Hexo</p>
        </div>
        <nav class="site-state motion-element">
          <div class="site-state-item site-state-posts">
            <a href="/archives">
              <span class="site-state-item-count">16</span>
              <span class="site-state-item-name">Artikel</span>
            </a>
          </div>

          
            <div class="site-state-item site-state-categories">
              <a href="/categories">
                <span class="site-state-item-count">10</span>
                <span class="site-state-item-name">Kategorien</span>
              </a>
            </div>
          

          
            <div class="site-state-item site-state-tags">
              <a href="/tags">
                <span class="site-state-item-count">23</span>
                <span class="site-state-item-name">Tags</span>
              </a>
            </div>
          

        </nav>

        

        <div class="links-of-author motion-element">
          
        </div>

        
        

        
        <div class="links-of-blogroll motion-element">
          
        </div>

      </section>

      
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc-indicator-top post-toc-indicator">
            <i class="fa fa-angle-double-up"></i>
          </div>
          <div class="post-toc">
            
              
            
            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-1"><a class="nav-link" href="#Bellman-ford-算法"><span class="nav-number">1.</span> <span class="nav-text">Bellman ford 算法</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#图的性质"><span class="nav-number">1.0.1.</span> <span class="nav-text">图的性质</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#bellman-ford算法思想"><span class="nav-number">1.0.2.</span> <span class="nav-text">bellman_ford算法思想</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#推论优化"><span class="nav-number">1.0.3.</span> <span class="nav-text">推论优化</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#伪代码"><span class="nav-number">1.0.4.</span> <span class="nav-text">伪代码</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#Dijkstra-与-bellman-ford算法的区别"><span class="nav-number">1.0.5.</span> <span class="nav-text">Dijkstra 与 bellman_ford算法的区别</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#想一想"><span class="nav-number">1.0.6.</span> <span class="nav-text">想一想</span></a></li></ol></li></ol></li></ol></div>
            
          </div>
          <div class="post-toc-indicator-bottom post-toc-indicator">
            <i class="fa fa-angle-double-down"></i>
          </div>
        </section>
      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright" >
  
  &copy; 
  <span itemprop="copyrightYear">2016</span>
  <span class="with-love">
    <i class="fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">Rainboy</span>
</div>

<div class="powered-by">
  Erstellt mit  <a class="theme-link" href="http://hexo.io">Hexo</a>
</div>

<div class="theme-info">
  Theme -
  <a class="theme-link" href="https://github.com/iissnan/hexo-theme-next">
    NexT.Mist
  </a>
</div>



      </div>
    </footer>

    <div class="back-to-top">
      <i class="fa fa-arrow-up"></i>
    </div>
  </div>

  


  




<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>


  <script type="text/javascript" src="/vendors/jquery/index.js?v=2.1.3"></script>

  <script type="text/javascript" src="/vendors/fastclick/lib/fastclick.min.js?v=1.0.6"></script>

  <script type="text/javascript" src="/vendors/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>

  <script type="text/javascript" src="/vendors/velocity/velocity.min.js"></script>

  <script type="text/javascript" src="/vendors/velocity/velocity.ui.min.js"></script>

  <script type="text/javascript" src="/vendors/fancybox/source/jquery.fancybox.pack.js"></script>


  


  <script type="text/javascript" src="/js/src/utils.js?v=0.5.0"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=0.5.0"></script>



  
  

  
  
<script type="text/javascript" src="/js/src/scrollspy.js?v=0.5.0"></script>

<script type="text/javascript" id="sidebar.toc.highlight">
  $(document).ready(function () {
    var tocSelector = '.post-toc';
    var $tocSelector = $(tocSelector);
    var activeCurrentSelector = '.active-current';

    $tocSelector
      .on('activate.bs.scrollspy', function () {
        var $currentActiveElement = $(tocSelector + ' .active').last();

        removeCurrentActiveClass();
        $currentActiveElement.addClass('active-current');

        $tocSelector[0].scrollTop = $currentActiveElement.position().top;
      })
      .on('clear.bs.scrollspy', function () {
        removeCurrentActiveClass();
      });

    function removeCurrentActiveClass () {
      $(tocSelector + ' ' + activeCurrentSelector)
        .removeClass(activeCurrentSelector.substring(1));
    }

    function processTOC () {
      getTOCMaxHeight();
      toggleTOCOverflowIndicators();
    }

    function getTOCMaxHeight () {
      var height = $('.sidebar').height() -
                   $tocSelector.position().top -
                   $('.post-toc-indicator-bottom').height();

      $tocSelector.css('height', height);

      return height;
    }

    function toggleTOCOverflowIndicators () {
      tocOverflowIndicator(
        '.post-toc-indicator-top',
        $tocSelector.scrollTop() > 0 ? 'show' : 'hide'
      );

      tocOverflowIndicator(
        '.post-toc-indicator-bottom',
        $tocSelector.scrollTop() >= $tocSelector.find('ol').height() - $tocSelector.height() ? 'hide' : 'show'
      )
    }

    $(document).on('sidebar.motion.complete', function () {
      processTOC();
    });

    $('body').scrollspy({ target: tocSelector });
    $(window).on('resize', function () {
      if ( $('.sidebar').hasClass('sidebar-active') ) {
        processTOC();
      }
    });

    onScroll($tocSelector);

    function onScroll (element) {
      element.on('mousewheel DOMMouseScroll', function (event) {
          var oe = event.originalEvent;
          var delta = oe.wheelDelta || -oe.detail;

          this.scrollTop += ( delta < 0 ? 1 : -1 ) * 30;
          event.preventDefault();

          toggleTOCOverflowIndicators();
      });
    }

    function tocOverflowIndicator (indicator, action) {
      var $indicator = $(indicator);
      var opacity = action === 'show' ? 1 : 0;
      $indicator.velocity ?
        $indicator.velocity('stop').velocity({
          opacity: opacity
        }, { duration: 100 }) :
        $indicator.stop().animate({
          opacity: opacity
        }, 100);
    }

  });
</script>

<script type="text/javascript" id="sidebar.nav">
  $(document).ready(function () {
    var html = $('html');
    var TAB_ANIMATE_DURATION = 200;
    var hasVelocity = $.isFunction(html.velocity);

    $('.sidebar-nav li').on('click', function () {
      var item = $(this);
      var activeTabClassName = 'sidebar-nav-active';
      var activePanelClassName = 'sidebar-panel-active';
      if (item.hasClass(activeTabClassName)) {
        return;
      }

      var currentTarget = $('.' + activePanelClassName);
      var target = $('.' + item.data('target'));

      hasVelocity ?
        currentTarget.velocity('transition.slideUpOut', TAB_ANIMATE_DURATION, function () {
          target
            .velocity('stop')
            .velocity('transition.slideDownIn', TAB_ANIMATE_DURATION)
            .addClass(activePanelClassName);
        }) :
        currentTarget.animate({ opacity: 0 }, TAB_ANIMATE_DURATION, function () {
          currentTarget.hide();
          target
            .stop()
            .css({'opacity': 0, 'display': 'block'})
            .animate({ opacity: 1 }, TAB_ANIMATE_DURATION, function () {
              currentTarget.removeClass(activePanelClassName);
              target.addClass(activePanelClassName);
            });
        });

      item.siblings().removeClass(activeTabClassName);
      item.addClass(activeTabClassName);
    });

    $('.post-toc a').on('click', function (e) {
      e.preventDefault();
      var targetSelector = NexT.utils.escapeSelector(this.getAttribute('href'));
      var offset = $(targetSelector).offset().top;
      hasVelocity ?
        html.velocity('stop').velocity('scroll', {
          offset: offset  + 'px',
          mobileHA: false
        }) :
        $('html, body').stop().animate({
          scrollTop: offset
        }, 500);
    });

    // Expand sidebar on post detail page by default, when post has a toc.
    NexT.motion.middleWares.sidebar = function () {
      var $tocContent = $('.post-toc-content');

      if (CONFIG.sidebar.display === 'post' || CONFIG.sidebar.display === 'always') {
        if ($tocContent.length > 0 && $tocContent.html().trim().length > 0) {
          NexT.utils.displaySidebar();
        }
      }
    };
  });
</script>



  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=0.5.0"></script>



  

  
    
  

  <script type="text/javascript">
    var duoshuoQuery = {short_name:"rainboy"};
    (function() {
      var ds = document.createElement('script');
      ds.type = 'text/javascript';ds.async = true;
      ds.id = 'duoshuo-script';
      ds.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//static.duoshuo.com/embed.js';
      ds.charset = 'UTF-8';
      (document.getElementsByTagName('head')[0]
      || document.getElementsByTagName('body')[0]).appendChild(ds);
    })();
  </script>

  
    
  





  
  
  
  <script type="text/x-mathjax-config">
    MathJax.Hub.Config({
      tex2jax: {
        inlineMath: [ ['$','$'], ["\\(","\\)"]  ],
        processEscapes: true,
        skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code']
      }
    });
  </script>

  <script type="text/x-mathjax-config">
    MathJax.Hub.Queue(function() {
      var all = MathJax.Hub.getAllJax(), i;
      for (i=0; i < all.length; i += 1) {
        all[i].SourceElement().parentNode.className += ' has-jax';
      }
    });
  </script>

  
    <script type="text/javascript" src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
  


  

  

</body>
</html>
